<template>
  <div>
    <b-navbar type="dark" variant="dark">
      <b-nav-form>
        <b-button variant="info" squared class="mr-2" @click="sendParentToggleInfo">
          <i :class="['iconfont', { 'icon-spread': !boolShowLeft, 'icon-recovery': boolShowLeft }]"></i>
        </b-button>
        <router-link v-for="(item, index) in post.info" v-bind:key="index" :to=" item.link">
          <b-button variant="info" class="mr-2" >
            {{item.text}}
          </b-button>
        </router-link>
      </b-nav-form>
    </b-navbar>
  </div>
</template>

<script>
export default {
  props: ["post"],
  data() {
    return {
      boolShowLeft: true,
    }
  },

  methods: {
    sendParentToggleInfo() {
      this.boolShowLeft = !this.boolShowLeft;
      this.$emit('sendToggleInfo', this.boolShowLeft);
    }
  },
}
</script>

<style lang="scss" scoped>
.btn{
  margin-right: 15px;
}
</style>
